home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / Squeezed.sqe < prev   
Encoding:
Text File  |  2004-06-14  |  1.5 KB  |  64 lines

  1. ========== Description Part Begin ==========
  2. name = "Squeezed";
  3. description = "The characters are squeezed till they fade out.";
  4. version = "1.00";
  5. bin = "squeezed.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11. $nSpeed(EDIT,INT,5,1 100,"Speed","The speed of character being squeezed.");
  12.  
  13. ========== Parameter Part End ==========
  14.  
  15. ========== Function Part Begin ==========
  16. nFrameCount = 10;
  17. nCharacterCount = 4;
  18. nSpeed = 15;
  19.  
  20. function init()
  21. {
  22.     
  23.     for (i = 1; i <= nCharacterCount; i++)
  24.     {
  25.         this["c" + i]._yscale = 100;
  26.         this["c" + i]._xscale = 100;
  27.         this["c" + i]._alpha = 100;
  28.     }
  29. }
  30.  
  31. function fun()
  32. {
  33.     
  34.     if(c1._yscale  < 0)
  35.     {
  36.         init();
  37.         return ;
  38.         
  39.     }
  40.  
  41.     for (i = 1; i <= nCharacterCount; i++)
  42.     {
  43.         this["c" + i]._yscale -= nSpeed;
  44.         this["c" + i]._xscale += nSpeed * 4;        
  45.         this["c" + i]._alpha -= nSpeed;
  46.     }
  47. }
  48.  
  49. function again()
  50. {
  51.     gotoAndPlay(2);
  52. }
  53.  
  54. ========== Function Part End ==========
  55.  
  56. ========== Frame Part Begin ==========
  57. $frame(init,1,-1,"init");
  58. $frame(fun,1,-1,"fun");
  59. $frame(fun,2,-1,"fun");
  60. $frame(again,3,-1,"again");
  61.  
  62.  
  63. ========== Frame Part End ==========
  64.